<?php echo $this->fetch('header.html'); ?>
<script type="text/javascript" src="<?php echo $this->res_base . "/" . 'js/jquery.vtip.js'; ?>" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true});
    $('.checkitem').attr('checked', false);//用于删除时返回复选框全部取消
});
</script>
<div id="rightTop">
  <ul class="subnav">
    <li><a class="btn0" href="index.php?app=address">地址管理</a></li>
  </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
<form method="get">
 <div class="left">
    <input type="hidden" name="app" value="address" />
    关键词:<input name="key" type="text" class="queryInput" style="width:250px" value="<?php echo htmlspecialchars($_GET['key']); ?>" placeholder="请输入姓名/电话/公司名"/>&nbsp;&nbsp;
    会员员:<input name="user_id" type="text" class="queryInput" style="width:100px" value="<?php echo htmlspecialchars($_GET['user_id']); ?>" placeholder="请输入会员ID"/>&nbsp;&nbsp;
    添加时间：<input type="text" value="<?php echo $_GET['add_time_from']; ?>" id="add_time_from" name="add_time_from" class="pick_date" /> 至
    <input type="text" value="<?php echo $_GET['add_time_to']; ?>" id="add_time_to" name="add_time_to" class="pick_date" />
    <select name="pagenum">
      <option value="20" <?php if ($this->_var['pagenum'] == 20): ?>selected<?php endif; ?>>每页20条</option>
      <option value="50" <?php if ($this->_var['pagenum'] == 50): ?>selected<?php endif; ?>>每页50条</option>
      <option value="100" <?php if ($this->_var['pagenum'] == 100): ?>selected<?php endif; ?>>每页100条</option>
      <option value="150" <?php if ($this->_var['pagenum'] == 150): ?>selected<?php endif; ?>>每页150条</option>
      <option value="200" <?php if ($this->_var['pagenum'] == 200): ?>selected<?php endif; ?>>每页200条</option>
   </select>
    <input type="submit" class="formbtn" value="查询" />
</div>
</form>
    </div>
    <div class="fontr"><?php echo $this->fetch('page.top.html'); ?></div>
</div>

<form action="" method="post" id="form_post" target="_blank">
<div class="tdare">
<table width="100%" cellspacing="0" class="dataTable">
    <tr class="tatr1">
      <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
        <td><span ectype="order_by" fieldname="no_id">编号</span></td>
        <td>会员名</td>
        <td>姓名</td>
        <td>电话</td>
        <td>地区</td>
        <td>地址</td>
        <td>邮编</td>
        <td>公司名</td>
        <td>邮箱</td>
        <td>身份证</td>
        <td>类型</td>
        <td>添加时间</td>        
      </tr>
    <?php $_from = $this->_var['lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['list']):
?>
    <tr class="tatr2">
      <td class="firstCell"><input type="checkbox" class="checkitem" value="<?php echo $this->_var['list']['addr_id']; ?>" /></td>
        <td class="left_style"><?php echo htmlspecialchars($this->_var['list']['addr_id']); ?></td>
        <td><a href="index.php?app=user&act=index&key=<?php echo $this->_var['list']['user_name']; ?>"><?php echo $this->_var['list']['user_name']; ?></a></td>
        <td><?php echo $this->_var['list']['consignee']; ?></td>
        <td><?php echo $this->_var['list']['phone_mob']; ?></td>
        <td><?php echo $this->_var['list']['txt_countrys']; ?></td>
        <td width="250"><?php echo $this->_var['list']['address']; ?></td>
        <td><?php echo $this->_var['list']['zipcode']; ?></td>
        <td><?php echo $this->_var['list']['txt_company']; ?></td>
        <td><?php echo $this->_var['list']['txt_email']; ?></td>
        <td><?php echo $this->_var['list']['txtidcode']; ?><?php if ($this->_var['list']['id_photo']): ?><a href="/data/files/mall/idphoto/<?php echo $this->_var['list']['id_photo']; ?>" target="_blank" class="vtip" title="点击查询身份证照片"><img src="/themes/default/styles/images/member/idpic.gif" width="17"></a><?php endif; ?></td>
        <td><?php if ($this->_var['list']['ddl_type'] == 2): ?>发货人<?php else: ?>收货人<?php endif; ?></td>
        <td><?php if ($this->_var['list']['addtime']): ?><?php echo local_date("Y-m-d H:i:s",$this->_var['list']['addtime']); ?><?php else: ?>-<?php endif; ?></td>
      </tr>
  <?php endforeach; else: ?>
</table>
<table width="100%" cellspacing="0" class="dataTable">
  <tr bgcolor="#FFFFFF">
    <td style="padding:8px; color:#F00; text-align:center; font-size:14px;">没有符合条件的记录</td>
  </tr>
  <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>
<div>
<?php if ($this->_var['lists']): ?>
<div id="dataFuncs">
  <div id="batchAction" class="left paddingT15">
   &nbsp;&nbsp;&nbsp;<label><input type="checkbox" class="checkall" /> 全选</label>&nbsp;&nbsp;
  <input class="formbtn batchButton" type="button" value="删除" name="id" uri="index.php?app=address&act=drop" presubmit="confirm('确定要删除当前记录吗，删除后不可找回！');"/>  
  </div>
  <div class="pageLinks"><?php echo $this->fetch('page.bottom.html'); ?></div>
<?php endif; ?>

 </div>
  <div class="clear"></div>
</div>
</div>
</form>
<?php echo $this->fetch('footer.html'); ?>